using System;
using System.ComponentModel.DataAnnotations;
using MESBaseis.Domain.BaseEntities;

namespace MESBaseis.Domain.XZY
{
    /// <summary>
    /// 生产工单实体
    /// </summary>
    public class ProductionOrderModel : BaseModel
    {
        /// <summary>
        /// 工单编号
        /// </summary>
        [Required]
        [StringLength(50)]
        public string OrderNumber { get; set; } = string.Empty;

        /// <summary>
        /// 生产物品
        /// </summary>
        [Required]
        [StringLength(200)]
        public string ProductionItem { get; set; } = string.Empty;

        /// <summary>
        /// 工单状态
        /// </summary>
        [Required]
        [StringLength(50)]
        public string Status { get; set; } = string.Empty;

        /// <summary>
        /// 计划开始时间
        /// </summary>
        public DateTime? PlannedStartTime { get; set; }

        /// <summary>
        /// 计划介绍时间
        /// </summary>
        public DateTime? PlannedIntroTime { get; set; }

        /// <summary>
        /// 实际开始时间
        /// </summary>
        public DateTime? ActualStartTime { get; set; }

        /// <summary>
        /// 实际完成时间
        /// </summary>
        public DateTime? ActualCompletionTime { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        [StringLength(100)]
        public string? ResponsiblePerson { get; set; }

        /// <summary>
        /// 计划数量
        /// </summary>
        public int PlannedQuantity { get; set; }

        /// <summary>
        /// 实际完成数量
        /// </summary>
        public int ActualQuantity { get; set; }

        /// <summary>
        /// 优先级
        /// </summary>
        public int Priority { get; set; } = 0;

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Remarks { get; set; }
    }
}